On Updating and Balancing Relaxed Balanced Search Trees in Main Memory

نویسنده

  • Lauri Malmi
چکیده

In this thesis, various methods for maintaining balanced search trees in main memory are considered. The work concentrates on algorithms applying relaxed balancing in which updates and rebalancing are uncoupled from each other. A new relaxed balanced tree, the rank-valued tree, which is a relaxed version of symmetric binary B-trees, also known as red-black trees, is introduced and analyzed. Rank-valued trees have the following benefits compared with chromatic trees, an older relaxed version of redblack trees. First, no rebalancing transformation will make the tree less balanced. Second, no rotations are needed if the tree is initially in balance. New algorithms for rebalancing relaxed balanced trees are given. The algorithm R1 rebalances a chromatic tree after M updates in O(M log(N+M)) time and using O(N+M) extra space, where N is the size of the initial tree. The algorithm R2 rebalances a heightvalued tree that is a relaxed AVL tree, in O(M logN) time, and it requires O(logN) extra space. A group-update operation means that a large number of records is inserted or deleted at one time. In this thesis, a new method of implementing group updates is discussed. Contrary to previous methods, in which balancing was carried out during the updates, in the new method balancing is postponed. This is important because in this way the updates are immediately accessible and there is no delay due to the rebalancing of the tree. The results imply that if M records are inserted below p leaves, denoted by r1, r2, . . . , rp, in an AVL tree T , the total time for performing the updates and rebalancing the tree is O(M + logN + ∑p−1 i=1 log di) in which di denotes the distance of the nodes ri and ri+1 in T , i.e., the number of leaves between them. A similar bound is obtained when deletions are allowed. Previously, the same bounds have been obtained for the method in which updates and rebalancing are tightly coupled. However, the bounds presented in the thesis also hold in the case when an arbitrary combination of insertions and deletions is performed, a result not obtained previously. Experimental tests have been performed using the presented algorithms. The results imply that group operations can speed up the performance considerably compared with standard search and update operations. An observation was made that the memory layout of the tree is very important for the behavior of balanced search trees. Thus, the efficiency of a simple tree searching algorithm can be increased by a factor of two when nodes that are logically close in the tree are physically close in the memory. The main reason for gaining efficiency is the reduced thrashing of cache memories. This implies that many tree algorithms should be redesigned to maintain the locality of the data structure.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

AVL Trees with Relaxed Balance

The idea of relaxed balance is to uncouple the rebalancing in search trees from the updating in order to speed up request processing in main-memory databases. In this paper, we describe a relaxed version of AVL trees. We prove that each update gives rise to at most a logarithmic number of rebalancing operations and that the number of rebalancing operations in the semidynamic case is amortized c...

متن کامل

The Performance of Concurrent Red-Black Tree Algorithms

Relaxed balancing has become a commonly used concept in the design of concurrent search tree algorithms. The idea of relaxed balancing is to uncouple the rebalancing from the updating in order to speed up the update operations and to allow a high degree of concurrency. Many di erent relaxed balancing algorithms have been proposed, especially for red-black trees and AVL trees, but their performa...

متن کامل

Relaxed Balance through Standard Rotations

We consider binary search trees, where rebalancing transformations need not be connected with updates but may be delayed. For standard AVL tree rebalancing, we prove that even though the rebalancing operations are un-coupled from updates, their total number is bounded by O(M log(M +N)), where M is the number of updates to an AVL tree of initial size N. Hence, relaxed balancing of AVL trees come...

متن کامل

Relaxed Balanced Red-Black Trees

Relaxed balancing means that, in a dictionary stored as a balanced tree, the necessary rebalancing after updates may be delayed. This is in contrast to strict balancing meaning that rebalancing is performed immediately after the update. Relaxed balancing is important for efficiency in highly dynamic applications where updates can occur in bursts. The rebalancing tasks can be performed gradually...

متن کامل

Amortization Results for Chromatic Search Trees, with an Application to Priority Queues

The intention in designing data structures with relaxed balance, such as chromatic search trees, is to facilitate fast updating on shared-memory asynchronous parallel architectures. To obtain this, the updating and rebalancing have been uncoupled, so extensive locking in connection with updates is avoided. In this paper, we prove that only an amortized constant amount of rebalancing is necessar...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997